package com.ch.exception;

public enum ErrorCode {
    SUCCESS(1200, "操作成功"),
    SUCCESS_LOGGED(1203,"已登录"),
    ERROR(1500, "操作失败"),
    ERROR_LOGIN(1600, "登录失败"),
    ERROR_TOKEN(1602,"TOKEN失效或者错误"),
    ERROR_ARG(1601, "参数错误"),
    ERROR_AUTH(1606, "认证失败"),
    ERROR_QUERY(1608, "数据丢失");

    private final int code;
    private final String msg;

    /**
     * @param code
     * @param msg
     */
    private ErrorCode(final int code, final String msg) {
        this.code = code;
        this.msg = msg;
    }

    /**
     * @return the code
     */
    public int getCode() {
        return code;
    }

    /**
     * @return the msg
     */
    public String getMsg() {
        return msg;
    }


}
